package com.lims.landInfo.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javacommon.base.*;

import cn.org.rapid_framework.util.*;

/**
 * @author zzh
 * @version 1.0
 * @since 1.0
 */
@Entity
@Table(name = "LIMS_Disposal")
public class Disposal extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;
	// date formats
	public static final String FORMAT_REST_DATE = DATE_FORMAT;
	public static final String FORMAT_LAND_DATE = DATE_FORMAT;
	public static final String FORMAT_CREATE_DATE = DATE_FORMAT;

	// columns START
	/**
	 * objid db_column: OBJID
	 */
	private java.lang.String objid;
	/**
	 * sno db_column: sno
	 */

	private java.lang.Integer sno;
	/**
	 * landno db_column: landno
	 */
	private java.lang.String landno;
	/**
	 * corpName db_column: corpName
	 */
	private java.lang.String corpName;
	/**
	 * restType db_column: restType
	 */
	private java.lang.Integer restType;
	/**
	 * restDate db_column: restDate
	 */
	private java.util.Date restDate;
	/**
	 * scale db_column: scale
	 */
	private java.lang.Double scale;
	/**
	 * restLandNum db_column: restLandNum
	 */
	private java.lang.Integer restLandNum;
	/**
	 * sellNum db_column: sellNum
	 */
	private java.lang.Integer sellNum;
	/**
	 * sellArea db_column: sellArea
	 */
	private java.lang.Double sellArea;
	/**
	 * shareNum db_column: shareNum
	 */
	private java.lang.Integer shareNum;
	/**
	 * shareArea db_column: shareArea
	 */
	private java.lang.Double shareArea;
	/**
	 * rentNum db_column: rentNum
	 */
	private java.lang.Integer rentNum;
	/**
	 * rentArea db_column: rentArea
	 */
	private java.lang.Double rentArea;
	/**
	 * appropriateNum db_column: appropriateNum
	 */
	private java.lang.Integer appropriateNum;
	/**
	 * appropriateArea db_column: appropriateArea
	 */
	private java.lang.Double appropriateArea;
	/**
	 * manageNum db_column: manageNum
	 */
	private java.lang.Integer manageNum;
	/**
	 * manageArea db_column: manageArea
	 */
	private java.lang.Double manageArea;
	/**
	 * rootNum db_column: rootNum
	 */
	private java.lang.Integer rootNum;
	/**
	 * rootArea db_column: rootArea
	 */
	private java.lang.Double rootArea;
	/**
	 * subordinateNum db_column: subordinateNum
	 */
	private java.lang.Integer subordinateNum;
	/**
	 * subordinateArea db_column: subordinateArea
	 */
	private java.lang.Double subordinateArea;
	/**
	 * persistNum db_column: persistNum
	 */
	private java.lang.Integer persistNum;
	/**
	 * persistAre db_column: persistAre
	 */
	private java.lang.Double persistAre;
	/**
	 * restNum db_column: restNum
	 */
	private java.lang.Integer restNum;
	/**
	 * restArea db_column: restArea
	 */
	private java.lang.Double restArea;
	/**
	 * restCause db_column: restCause
	 */
	private java.lang.Integer restCause;
	/**
	 * noRestNum db_column: noRestNum
	 */
	private java.lang.Integer noRestNum;
	/**
	 * noRestArea db_column: noRestArea
	 */
	private java.lang.Double noRestArea;
	/**
	 * noRestCause db_column: noRestCause
	 */
	private java.lang.Integer noRestCause;
	/**
	 * changeType db_column: changeType
	 */
	private java.lang.Integer changeType;
	/**
	 * oldno db_column: oldno
	 */
	private java.lang.String oldno;
	/**
	 * oldContent db_column: oldContent
	 */
	private java.lang.String oldContent;
	/**
	 * describe db_column: describe
	 */
	private java.lang.String describe;
	/**
	 * landDate db_column: landDate
	 */
	private java.util.Date landDate;
	/**
	 * createDate db_column: createDate
	 */
	private java.util.Date createDate;

	// columns END

	public Disposal() {
	}

	public Disposal(java.lang.String objid) {
		this.objid = objid;
	}

	public void setObjid(java.lang.String value) {
		this.objid = value;
	}

	@Id
	@GeneratedValue(generator = "custom-id")
	@GenericGenerator(name = "custom-id", strategy = "uuid")//unique = false, 
	@Column(name = "OBJID", nullable = false, insertable = true, updatable = true, length = 32)
	public java.lang.String getObjid() {
		return this.objid;
	}

	@Column(name = "sno", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getSno() {
		return this.sno;
	}

	public void setSno(java.lang.Integer value) {
		this.sno = value;
	}

	@Column(name = "landno", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getLandno() {
		return this.landno;
	}

	public void setLandno(java.lang.String value) {
		this.landno = value;
	}

	@Column(name = "corpName", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public java.lang.String getCorpName() {
		return this.corpName;
	}

	public void setCorpName(java.lang.String value) {
		this.corpName = value;
	}

	@Column(name = "restType", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getRestType() {
		return this.restType;
	}

	public void setRestType(java.lang.Integer value) {
		this.restType = value;
	}

	@Transient
	public String getRestDateString() {
		return DateConvertUtils.format(getRestDate(), FORMAT_REST_DATE);
	}

	public void setRestDateString(String value) {
		setRestDate(DateConvertUtils.parse(value, FORMAT_REST_DATE,
				java.util.Date.class));
	}

	@Column(name = "restDate", unique = false, nullable = true, insertable = true, updatable = true, length = 23)
	public java.util.Date getRestDate() {
		return this.restDate;
	}

	public void setRestDate(java.util.Date value) {
		this.restDate = value;
	}

	@Column(name = "scale", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getScale() {
		return this.scale;
	}

	public void setScale(java.lang.Double value) {
		this.scale = value;
	}

	@Column(name = "restLandNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getRestLandNum() {
		return this.restLandNum;
	}

	public void setRestLandNum(java.lang.Integer value) {
		this.restLandNum = value;
	}

	@Column(name = "sellNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getSellNum() {
		return this.sellNum;
	}

	public void setSellNum(java.lang.Integer value) {
		this.sellNum = value;
	}

	@Column(name = "sellArea", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getSellArea() {
		return this.sellArea;
	}

	public void setSellArea(java.lang.Double value) {
		this.sellArea = value;
	}

	@Column(name = "shareNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getShareNum() {
		return this.shareNum;
	}

	public void setShareNum(java.lang.Integer value) {
		this.shareNum = value;
	}

	@Column(name = "shareArea", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getShareArea() {
		return this.shareArea;
	}

	public void setShareArea(java.lang.Double value) {
		this.shareArea = value;
	}

	@Column(name = "rentNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getRentNum() {
		return this.rentNum;
	}

	public void setRentNum(java.lang.Integer value) {
		this.rentNum = value;
	}

	@Column(name = "rentArea", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getRentArea() {
		return this.rentArea;
	}

	public void setRentArea(java.lang.Double value) {
		this.rentArea = value;
	}

	@Column(name = "appropriateNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getAppropriateNum() {
		return this.appropriateNum;
	}

	public void setAppropriateNum(java.lang.Integer value) {
		this.appropriateNum = value;
	}

	@Column(name = "appropriateArea", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getAppropriateArea() {
		return this.appropriateArea;
	}

	public void setAppropriateArea(java.lang.Double value) {
		this.appropriateArea = value;
	}

	@Column(name = "manageNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getManageNum() {
		return this.manageNum;
	}

	public void setManageNum(java.lang.Integer value) {
		this.manageNum = value;
	}

	@Column(name = "manageArea", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getManageArea() {
		return this.manageArea;
	}

	public void setManageArea(java.lang.Double value) {
		this.manageArea = value;
	}

	@Column(name = "rootNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getRootNum() {
		return this.rootNum;
	}

	public void setRootNum(java.lang.Integer value) {
		this.rootNum = value;
	}

	@Column(name = "rootArea", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getRootArea() {
		return this.rootArea;
	}

	public void setRootArea(java.lang.Double value) {
		this.rootArea = value;
	}

	@Column(name = "subordinateNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getSubordinateNum() {
		return this.subordinateNum;
	}

	public void setSubordinateNum(java.lang.Integer value) {
		this.subordinateNum = value;
	}

	@Column(name = "subordinateArea", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getSubordinateArea() {
		return this.subordinateArea;
	}

	public void setSubordinateArea(java.lang.Double value) {
		this.subordinateArea = value;
	}

	@Column(name = "persistNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getPersistNum() {
		return this.persistNum;
	}

	public void setPersistNum(java.lang.Integer value) {
		this.persistNum = value;
	}

	@Column(name = "persistAre", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getPersistAre() {
		return this.persistAre;
	}

	public void setPersistAre(java.lang.Double value) {
		this.persistAre = value;
	}

	@Column(name = "restNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getRestNum() {
		return this.restNum;
	}

	public void setRestNum(java.lang.Integer value) {
		this.restNum = value;
	}

	@Column(name = "restArea", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getRestArea() {
		return this.restArea;
	}

	public void setRestArea(java.lang.Double value) {
		this.restArea = value;
	}

	@Column(name = "restCause", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getRestCause() {
		return this.restCause;
	}

	public void setRestCause(java.lang.Integer value) {
		this.restCause = value;
	}

	@Column(name = "noRestNum", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getNoRestNum() {
		return this.noRestNum;
	}

	public void setNoRestNum(java.lang.Integer value) {
		this.noRestNum = value;
	}

	@Column(name = "noRestArea", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getNoRestArea() {
		return this.noRestArea;
	}

	public void setNoRestArea(java.lang.Double value) {
		this.noRestArea = value;
	}

	@Column(name = "noRestCause", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getNoRestCause() {
		return this.noRestCause;
	}

	public void setNoRestCause(java.lang.Integer value) {
		this.noRestCause = value;
	}

	@Column(name = "changeType", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getChangeType() {
		return this.changeType;
	}

	public void setChangeType(java.lang.Integer value) {
		this.changeType = value;
	}

	@Column(name = "oldno", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getOldno() {
		return this.oldno;
	}

	public void setOldno(java.lang.String value) {
		this.oldno = value;
	}

	@Column(name = "oldContent", unique = false, nullable = true, insertable = true, updatable = true, length = 100)
	public java.lang.String getOldContent() {
		return this.oldContent;
	}

	public void setOldContent(java.lang.String value) {
		this.oldContent = value;
	}

	@Column(name = "describe", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getDescribe() {
		return this.describe;
	}

	public void setDescribe(java.lang.String value) {
		this.describe = value;
	}

	@Transient
	public String getLandDateString() {
		return DateConvertUtils.format(getLandDate(), FORMAT_LAND_DATE);
	}

	public void setLandDateString(String value) {
		setLandDate(DateConvertUtils.parse(value, FORMAT_LAND_DATE,
				java.util.Date.class));
	}

	@Column(name = "landDate", unique = false, nullable = true, insertable = true, updatable = true, length = 23)
	public java.util.Date getLandDate() {
		return this.landDate;
	}

	public void setLandDate(java.util.Date value) {
		this.landDate = value;
	}

	@Transient
	public String getCreateDateString() {
		return DateConvertUtils.format(getCreateDate(), FORMAT_CREATE_DATE);
	}

	public void setCreateDateString(String value) {
		setCreateDate(DateConvertUtils.parse(value, FORMAT_CREATE_DATE,
				java.util.Date.class));
	}

	@Column(name = "createDate", unique = false, nullable = true, insertable = true, updatable = true, length = 23)
	public java.util.Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("Objid", getObjid()).append("Sno", getSno())
				.append("Landno", getLandno())
				.append("CorpName", getCorpName())
				.append("RestType", getRestType())
				.append("RestDate", getRestDate()).append("Scale", getScale())
				.append("RestLandNum", getRestLandNum())
				.append("SellNum", getSellNum())
				.append("SellArea", getSellArea())
				.append("ShareNum", getShareNum())
				.append("ShareArea", getShareArea())
				.append("RentNum", getRentNum())
				.append("RentArea", getRentArea())
				.append("AppropriateNum", getAppropriateNum())
				.append("AppropriateArea", getAppropriateArea())
				.append("ManageNum", getManageNum())
				.append("ManageArea", getManageArea())
				.append("RootNum", getRootNum())
				.append("RootArea", getRootArea())
				.append("SubordinateNum", getSubordinateNum())
				.append("SubordinateArea", getSubordinateArea())
				.append("PersistNum", getPersistNum())
				.append("PersistAre", getPersistAre())
				.append("RestNum", getRestNum())
				.append("RestArea", getRestArea())
				.append("RestCause", getRestCause())
				.append("NoRestNum", getNoRestNum())
				.append("NoRestArea", getNoRestArea())
				.append("NoRestCause", getNoRestCause())
				.append("ChangeType", getChangeType())
				.append("Oldno", getOldno())
				.append("OldContent", getOldContent())
				.append("Describe", getDescribe())
				.append("LandDate", getLandDate())
				.append("CreateDate", getCreateDate()).toString();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(getObjid()).toHashCode();
	}

	public boolean equals(Object obj) {
		if (obj instanceof Disposal == false)
			return false;
		if (this == obj)
			return true;
		Disposal other = (Disposal) obj;
		return new EqualsBuilder().append(getObjid(), other.getObjid())
				.isEquals();
	}
}
